Skip to content

COM Ports not found hard crash fix#8

Open
VashBaldeus wants to merge 4 commits intoTheCod3rYouTube:mainfrom
VashBaldeus:main
Open

COM Ports not found hard crash fix#8
VashBaldeus wants to merge 4 commits intoTheCod3rYouTube:mainfrom
VashBaldeus:main

Conversation

@VashBaldeus
Copy link

@VashBaldeus VashBaldeus commented May 14, 2024

When trying to debug, I encountered an issue with hard-crash coming from the Form1_Load method, result was that string[] ports = SerialPort.GetPortNames(); returned no ports (my PC has no COM). I fixed it by checking for the ports array to be longer than 0 before assigning anything thus preventing a hard crash.

Also added a message when user manually refreshes COM ports that will show in case no ports were found further preventing hard crash of the program.

Fixed an issue with loading com ports on start up, where it attempted to set combo box selectedindex to 0 where no ports found.
Fixed additional port search where it will not change anything if no ports found.
Added message on COM port refresh in case nothing found to alert user of a problem.
@ghost
Copy link

ghost commented Aug 10, 2024

The software is not GUI for me, can anyone help me?

Copy link

@blackletum blackletum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only suggestion I have is a minor orthographic one:

"Not existing COM ports were found!"

should be changed to:

No existing COM ports were found!

@VashBaldeus VashBaldeus requested a review from blackletum May 9, 2025 13:31
@VashBaldeus
Copy link
Author

VashBaldeus commented May 9, 2025

It has been a year, was this implemented in the software yet? I hope it does. I did correct a spelling mistake I noticed in the message about no COM ports found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants